import Vue from "vue";
import axios from "./axios";
const Api = "/uploadImage/appImage";
// 上传图片

const $upImg = (file, data = {}) => {
  const params = new FormData();
  params.append("file", file);
  return axios.post(Api, params, {
    params: data,
    headers: {
      "Content-Type": "multipart/form-data",
    },
  });
};

Vue.prototype.$upImg = $upImg;

export default $upImg;
